<template>
	<view class="page">
		<block v-for="(item, index) in myInfoList" :key="item.ID">
			<view class="job-resume-item">
				<view class="job-resume-info" @click="goToPersonalShow(item.ID)">
					<view class="job-resume-info-avatar">
						<u-avatar :src="$getImgUrl(item.TXImg)" size="100rpx" @click="goToPersonalShow(item.ID)"></u-avatar>
						<image class="job-resume-info-avatar-sex" :src="item.Sex == '男'? '/static/job/man.png':'/static/job/w.png'"></image>
					</view>
					<view class="job-resume-info-content">
						<view class="job-resume-info-head">
							<view class="job-resume-info-title">{{ item.Name }}<text>（{{ item.GWName }}）</text></view>
							<view class="job-resume-info-salary">{{ item.XZName }}</view>
						</view>
						<view class="job-resume-info-body">
							<view class="job-resume-info-tag">
								<view class="job-resume-info-tag-item">
									<u-tag :text="item.GZJY + '工作经验'" bgColor="#f7d9da" color="#c8000a" size="minimal" type="warning" @click="goToPersonalShow(item.ID)"></u-tag>
								</view>
								<view class="job-resume-info-tag-item">
									<u-tag :text="item.Age + '岁'" bgColor="#f7d9da" color="#c8000a" size="minimal" type="warning" @click="goToPersonalShow(item.ID)"></u-tag>
								</view>
							</view>
							<view class="job-resume-info-time">{{ setTimeTxt(item.ShiJian)}}</view>
						</view>
						<view class="job-resume-info-bottom">
							<view class="job-resume-info-specialty">
								<text>{{ item.WorkJL }}</text>
								<!-- <text>会用电焊</text>
								<text>气割</text> -->
							</view>
							<view class="job-resume-info-area">{{ item.DiYu }}</view>
						</view>
					</view>
				</view>
			</view>
			<u-gap height="5" bgColor="#f5f5f5" marginTop="10rpx" marginBottom="20rpx"></u-gap>
		</block>
	</view>
</template>

<script>
	import {getDateDiff , getFormatTime} from '../../common/common.js'
	export default {
		name:"Resume",
		data() {
			return {
				myInfoList:[], // 接收的列表
			};
		},
		props: {
			newResumeList: {
				type: Array,
				default() {
					return [];
				}
			},
		},
		methods: {
			setTimeTxt(time){
				return getDateDiff(parseInt(time)*1000) 
			},
			goToPersonalShow(id) {
				uni.$u.route({
					url: 'pages/jobPersonal/jobPersonal',
					params: {
						ID: id
					}
				});
			}
		},
		watch: {
			newResumeList: function(newVal, oldVal) {
				this.myInfoList = newVal;
				console.log(this.myInfoList)
			}
			
		}
		
	}
</script>

<style lang="scss" scoped>
/* 求职简历开始 */
.job-resume-list {
	display: flex;
	flex-direction: column;
	width: 100%;
}
.job-resume-item {
	width: 97%;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	padding: 20rpx 10rpx;
}
.job-resume-info {
	display: flex;
	flex-direction: row;
	align-items: center;
}
.job-resume-info-avatar {
	width: 93rpx;
	height: 93rpx;
	text-align: center;
	line-height: 93rpx;
}
.job-resume-info-avatar-sex {
	width: 27rpx;
	height: 27rpx;
	// z-index: 2;
	position: relative;
	left: 32rpx;
	bottom: 60rpx;
}
.job-resume-info-content {
	width: 100%;
	padding-left: 20rpx;
	display: flex;
	flex-direction: column;
}
.job-resume-info-head {
	padding: 4rpx 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
}
.job-resume-info-title {
	width: 430rpx;
    font-size: 30rpx;
    color: #333333;
    line-height: 30rpx;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;	
}
.job-resume-info-title>text{
    font-size: 30rpx;
    color: #999999;
    line-height: 30rpx;
    margin-left: 4rpx;
}
.job-resume-info-salary {
	width: auto;
	font-size: 30rpx;
	color: #c8000a;
	line-height: 30rpx;
	float: right;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.job-resume-info-body {
	padding: 4rpx 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
}
.job-resume-info-tag {
	display: flex;
	flex-direction: row;
}
.job-resume-info-tag-item {
	padding-right: 10rpx;
}
.job-resume-info-tag-item /deep/ .u-tag {
	height: 28rpx;
	line-height: 28rpx;
}
.job-resume-info-time {
	font-size: 26rpx;
	color: #999999;
	line-height: 26rpx;	
}
.job-resume-info-bottom {
	padding: 4rpx 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
}
.job-resume-info-specialty {
	font-size: 24rpx;
	color: #999999;
	line-height: 26rpx;	
}
.job-resume-info-specialty>text {
    font-size: 26rpx;
    color: #999999;
    line-height: 26rpx;
    margin-right: 20rpx;
}
.job-resume-info-area {
	width: auto;
	font-size: 24rpx;
	color: #999999;
	line-height: 26rpx;
	text-align: right;
}
/* 求职简历结束 */
</style>
